package com.tang.model.intermediary.chatroom;

/**
 * @Author tangyuan2meicloud.com
 * @DATE 2021/9/6 7:55
 * @Desc
 * @Remarks
 */
public class User {

    private String name;

    private Chatroom chatroom;

    public User(String name, Chatroom chatroom) {
        this.name = name;
        this.chatroom = chatroom;
    }

    public String getName() {
        return name;
    }

    public void say(String msg) {
        chatroom.publish(this, msg);
    }

}
